<?php
/*
* phpCan - http://idc.anavallasuiza.com/
*
* phpCan is released under the GNU Affero GPL version 3
*
* More information at license.txt
*/

defined('ANS') or die();

$Debug->setSettings('debug');

$basedir = array_shift($Vars->path);
$path = $basedir.'|'.implode('/', $Vars->path);
$file = filePath($path);

//Check if file exists
if (!is_file($file)) {
	$Debug->fatalError(__('This file doesn\'t exists'));
}

//Save file info
$file_info = pathinfo($file);

$file_info['file'] = $file;
$file_info['www-file'] = fileWeb($path);
$file_info['extension'] = strtolower($file_info['extension']);
?>